<template>
	<dv-border-box-2 :color="['#015c31', '#009a44']" class="management_wrap">
		<el-container style="height: 100%; width: 100%;">
			<el-aside width="300px">
				<el-menu :default-active="currentPath" router>
					<el-menu-item index="user" style="font-size: 20px" rou>
						<i class="blq-icon-manager" style="font-size: 24px; padding: 10px"></i>
						<span slot="title">用户管理</span>
					</el-menu-item>
					<el-menu-item index="data" style="font-size: 20px">
						<i class="blq-icon-database-set" style="font-size: 24px; padding: 10px"></i>
						<span slot="title">数据管理</span>
					</el-menu-item>
				</el-menu>
			</el-aside>
			<el-main style="height: 100%;">
				<router-view></router-view>
			</el-main>
		</el-container>
	</dv-border-box-2>
</template>

<script>
export default {
	data() {
		return {}
	},
	computed: {
		currentPath() {
			return this.$route.path.split('/')[2];
		}
	},
	methods: {},
	mounted() {
		if (!this.$store.state.user.userState) {
			this.$router.push({ path: '/index' });
		}
	}
}
</script>

<style scoped lang="scss">
.management_wrap {
	width: 100%;
	height: 90%;
	margin: 24px 0 0;
	padding: 7px;
	overflow: hidden;
}
</style>